package com.ruoyi.merchant.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.merchant.mapper.CfMerchantVerificationMapper;
import com.ruoyi.merchant.domain.CfMerchantVerification;
import com.ruoyi.merchant.service.ICfMerchantVerificationService;

/**
 * 商户认证Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-08-14
 */
@Service
public class CfMerchantVerificationServiceImpl implements ICfMerchantVerificationService 
{
    @Autowired
    private CfMerchantVerificationMapper cfMerchantVerificationMapper;

    /**
     * 查询商户认证
     *
     * @param id 商户认证主键
     * @return 商户认证
     */
    @Override
    public CfMerchantVerification selectCfMerchantVerificationById(Long id)
    {
        return cfMerchantVerificationMapper.selectCfMerchantVerificationById(id);
    }

    /**
     * 查询商户认证列表
     *
     * @param cfMerchantVerification 商户认证
     * @return 商户认证
     */
    @Override
    public List<CfMerchantVerification> selectCfMerchantVerificationList(CfMerchantVerification cfMerchantVerification)
    {
        return cfMerchantVerificationMapper.selectCfMerchantVerificationList(cfMerchantVerification);
    }

    @Override
    public List<CfMerchantVerification> getMerchantByMerchantId( ) {
        return cfMerchantVerificationMapper.getMerchantByMerchantId();
    }
    /**
     * 新增商户认证
     *
     * @param cfMerchantVerification 商户认证
     * @return 结果
     */
    @Override
    public int insertCfMerchantVerification(CfMerchantVerification cfMerchantVerification)
    {
        cfMerchantVerification.setCreateTime(DateUtils.getNowDate());
        return cfMerchantVerificationMapper.insertCfMerchantVerification(cfMerchantVerification);
    }

    /**
     * 修改商户认证
     *
     * @param cfMerchantVerification 商户认证
     * @return 结果
     */
    @Override
    public int updateCfMerchantVerification(CfMerchantVerification cfMerchantVerification)
    {
        cfMerchantVerification.setUpdateTime(DateUtils.getNowDate());
        return cfMerchantVerificationMapper.updateCfMerchantVerification(cfMerchantVerification);
    }

    /**
     * 批量删除商户认证
     *
     * @param ids 需要删除的商户认证主键
     * @return 结果
     */
    @Override
    public int deleteCfMerchantVerificationByIds(Long[] ids)
    {
        return cfMerchantVerificationMapper.deleteCfMerchantVerificationByIds(ids);
    }

    /**
     * 删除商户认证信息
     *
     * @param id 商户认证主键
     * @return 结果
     */
    @Override
    public int deleteCfMerchantVerificationById(Long id)
    {
        return cfMerchantVerificationMapper.deleteCfMerchantVerificationById(id);
    }
}
